package com.example.blog.controller;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : LiuWenHao
 * @create 2023/2/25 19:10
 */
import com.example.blog.dao.UserDao;
import com.example.blog.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.xml.transform.Result;
import java.util.List;
import java.util.Map;

@ResponseBody
@Controller
@CrossOrigin(originPatterns = "*",allowCredentials = "true")
public class user {
    @Autowired
    private UserDao userDao;
    @PostMapping(value="/login")
    public List<User> hello(@RequestBody User user) {
        System.out.println(user);
        List<User> users = userDao.getUserList(1);
        System.out.println(users);
        return users;
    }
    @PostMapping(value="/ss")
    public  void ce(String name,String password){
        System.out.println(name+password);

    }

}
